<ul>
    <li><a href="index.jsp">Home</a></li>

    <% if (session.getAttribute("username") == null) {%>
    <li><a href="ricerca.jsp">Ricerca</a></li>

</ul>

<center>

    <form action="ControllerLogin" method="POST">
        <p>Username:<br><input type="text" name="username"></p>
        <p>Password:<br><input type="password" name="password"></p>
            <% if (request.getAttribute("errore") != null) {
            %>
        <p style="color:red">Username/Password errate</p>
        <%                        }
        %>
        <p><input type="submit" value="Login"></p>

    </form>
</center>
<% } else if (session.getAttribute("ruolo").equals("b")) {
%>
<li><a href="inserisci.jsp">Inserisci libro</a></li>
<li><a href="gestisci.jsp">Gestisci libri</a></li>
<li><form action="ControllerLogin" method="POST" id="logout">
        <input type="hidden" name="logout" value="1">

        </input>
    </form>
    <a href="javascript:document.getElementById('logout').submit();">Logout</a></li>
</ul>
<%                    } else if (session.getAttribute("ruolo").equals("u")) {
%>
    <li><a href="ricerca.jsp">Ricerca e prenota</a></li>

<li><a href="prenotazioni.jsp">Prenotazioni</a></li>
<li><form action="ControllerLogin" method="POST" id="logout">
        <input type="hidden" name="logout" value="1">

        </input>
    </form>
    <a href="javascript:document.getElementById('logout').submit();">Logout</a></li>

</ul>
<%                    }
%>
